<template>
  <el-drawer
    :title="title"
    :modal-append-to-body="false"
    :modal="false"
    size="auto"
    :wrapperClosable="false"
    :visible.sync="isShow"
    direction="rtl"
    class="company-detail"
    @close="closeDrawer"
    >
    <div class="drawer-body">
      <el-scrollbar style="height:100%">
        <el-form size="small">
          <el-row :gutter="20">
            <el-col :xs="24">
            <el-form-item label="污染源名称：" required>
              <el-input v-model="form.name" placeholder="请输入" />
            </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12">
            <el-form-item label="污染源类别：">
              <el-input v-model="form.class" placeholder="请输入" disabled />
            </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12">
            <el-form-item label="占地面积（m²）：">
              <el-input v-model="form.area_dust" placeholder="请输入" />
            </el-form-item>
            </el-col>
            <el-col :xs="24">
            <el-form-item label="详细地址：">
              <el-input v-model="form.address" placeholder="请输入" />
            </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12">
            <el-form-item label="经度[113-115]：" required>
              <el-input v-model="form.lon" placeholder="请输入" />
            </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12">
            <el-form-item label="纬度[21-23]：" required>
              <el-input v-model="form.lat" placeholder="请输入" />
            </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12">
            <el-form-item label="所属区县：" required>
              <el-select v-model="form.county" placeholder="请输入" style="width:100%">
                <el-option v-for="(item,index) in initData.countys" :key="index" :label="item.name" :value="item.name"></el-option>
              </el-select>
            </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12">
            <el-form-item label="所属镇街：">
              <el-input v-model="form.town" placeholder="请输入" />
            </el-form-item>
            </el-col>
            <el-col :xs="24">
            <el-form-item label="Ⅱ级应对措施：">
              <el-input v-model="form.measures2_pm" placeholder="请输入" type="textarea" />
            </el-form-item>
            </el-col>
            <el-col :xs="24">
            <el-form-item label="Ⅲ级应对措施：">
              <el-input v-model="form.measures3_pm" placeholder="请输入" type="textarea" />
            </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12">
            <el-form-item label="最后更新日期：">
              <div>{{form.update_time}}</div>
            </el-form-item>
            </el-col>
            <el-col :xs="24" :sm="12">
            <el-form-item label="最后更新人：">
              <div>{{form.last_editor}}</div>
            </el-form-item>
            </el-col>
          </el-row>
        </el-form>
      </el-scrollbar>
    </div>
    <div class="btn-group align-center p-a-14">
      <el-button size="small" @click="isShow = false">取消</el-button>
      <el-button :loading="btnLoading" size="small" type="primary" @click="submitForm">保存</el-button>
    </div>
  </el-drawer>
</template>
<script>
import editMixins from './editMixins';
export default {
  mixins: [editMixins],
}
</script>